package com.scenic.rd_android.testview.lstview;

import android.os.Bundle;
import android.widget.ListView;

import com.nova.scenic.projectlibs.util.BaseActivity;
import com.scenic.rd_android.R;

/**
 *  Android ListView异步加载图片乱序问题，原因分析及解决方案
 */
public class ListViewLoadImageEctopicActivity extends BaseActivity {

    private static final String TAG = "ListViewLoadImageEctopicActivity";
    private ListView mListView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_list_view_load_image_ectopic);
        mListView = (ListView) findViewById(R.id.list_view);
//        ImageAdapter adapter = new ImageAdapter(this, 0, Images.imageUrls);
//        ImageAdapterError adapter = new ImageAdapterError(this, 0, Images.imageUrls);
        ImageAdapterWeekReference adapter = new ImageAdapterWeekReference(this, 0, Images.imageUrls);

        mListView.setAdapter(adapter);
    }





    /**
     * 原文地址: http://blog.csdn.net/guolin_blog/article/details/45586553
     * @author guolin
     */
    public static class Images {

        public final static String[] imageUrls = new String[] {
                "http://img.my.csdn.net/uploads/201508/05/1438760758_3497.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760758_6667.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760757_3588.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760756_3304.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760755_6715.jpeg",
                "http://img.my.csdn.net/uploads/201508/05/1438760726_5120.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760726_8364.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760725_4031.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760724_9463.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760724_2371.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760707_4653.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760706_6864.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760706_9279.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760704_2341.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760704_5707.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760685_5091.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760685_4444.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760684_8827.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760683_3691.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760683_7315.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760663_7318.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760662_3454.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760662_5113.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760661_3305.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760661_7416.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760589_2946.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760589_1100.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760588_8297.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760587_2575.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760587_8906.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760550_2875.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760550_9517.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760549_7093.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760549_1352.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760548_2780.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760531_1776.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760531_1380.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760530_4944.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760530_5750.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760529_3289.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760500_7871.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760500_6063.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760499_6304.jpeg",
                "http://img.my.csdn.net/uploads/201508/05/1438760499_5081.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760498_7007.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760478_3128.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760478_6766.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760477_1358.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760477_3540.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760476_1240.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760446_7993.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760446_3641.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760445_3283.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760444_8623.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760444_6822.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760422_2224.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760421_2824.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760420_2660.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760420_7188.jpg",
                "http://img.my.csdn.net/uploads/201508/05/1438760419_4123.jpg",
        };
    }
}
